<?php
	//获取全部信息数据 
	require '../autoload.php';
	$mp = new MyPdo();
	$sql = 'select * from translate_info';
	$res = $mp->dql($sql,array());
	if($res){
		$data = Array();
		foreach($res as $v){
			$data[$v['typeid']][] = array($v['lefts'],$v['rights']);
		}
		echo $str = json_encode($data);
		$dir = '../Runtime/CacheInfoAll/';
		if(!is_dir($dir)){
			mkdir($dir,0777,true);
		}
		$file = $dir.'info_all';
		file_put_contents($file,$str);
	}